home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / cad / tek2400.zip / TEK2400.DOC next >
Text File  |  1993-01-04  |  37KB  |  949 lines

  1.  
  2.                    Tektronix 2400 Series Digital Oscilloscopes
  3. _____________________________________________________________________________
  4.  
  5.  Introduction:
  6.  
  7.    This  instrument  module  provides  GPIB  programming  support  for  the
  8.    Tektronix 2400 series of digital oscilloscope - 2430A, 2432, and 2440.  It
  9.    contains functions for opening, configuring, reading  waveforms  from, and
  10.    manipulating the cursor capabilities of the instrument.
  11. _____________________________________________________________________________
  12.  
  13.   Assumptions:
  14.  
  15.     To successfully use this module, the following conditions must be met:
  16.  
  17.       - one of the indicated scopes is connected to the GPIB.
  18.       - the  GPIB address supplied to the initialize function must match
  19.         the current GPIB address of the scope.
  20.       - there is one unused device name in the handler.
  21. _____________________________________________________________________________
  22.  
  23.   LabWindows Libraries:
  24.  
  25.     In  order to use this instrument module outside of the LabWindows envi-
  26.     ronment, it must be linked with the following LabWindows libraries:
  27.  
  28.       - Formatting and I/O
  29.       - GPIB
  30.       - Analysis
  31. _____________________________________________________________________________
  32.  
  33.   Error Codes:
  34.  
  35.     All  error codes are  returned  in a global integer variable whose name
  36.     depends on the language being used:
  37.  
  38.         For QuickBASIC : tek2400.err%
  39.         For C          : tek2400_err
  40.  
  41.     A program should examine this variable after each function call is made
  42.     to determine if any errors occurred.
  43. _____________________________________________________________________________
  44.  
  45.   Function Tree Layout:
  46.  
  47.     Initialize
  48.     Configure
  49.         Vertical
  50.         Horizontal
  51.         A Trigger
  52.         B Trigger
  53.         Auto Setup
  54.         Acquisition Settings
  55.         Save Settings
  56.     Read Waveform
  57.     Save to Reference
  58.     Measurement Functions
  59.         Setup Measurement
  60.         Read Measurement
  61.     Cursor Functions
  62.         Set Cursor
  63.         Read Cursor
  64.     Close
  65.  
  66. _____________________________________________________________________________
  67.  
  68.   Function           : Initialize
  69.  
  70.   QuickBASIC Syntax  : CALL tek2400.init(Addr%)
  71.  
  72.   C Syntax           : void tek2400_init(Addr);
  73.                        int Addr;
  74.  
  75.   Purpose            : Initializes the 2340A on the GPIB
  76.  
  77.   Parameter List     : Addr - GPIB Address (0 to 30)
  78.  
  79.   QuickBASIC Example : CALL tek2400.init(1)
  80.  
  81.   C Example          : tek2400_init(1);
  82.  
  83.   Error Codes        : The valid error codes for this function are:
  84.                            0 : Success
  85.                           -1 : GPIB Address out of range
  86.                          220 : Unable to open instrument
  87.                          223 : Device at specified address is not a 2400
  88.                                 series oscilloscope
  89.                          230 : GPIB write error
  90.                          231 : GPIB read error
  91.                          233 : Unable to configure GPIB address
  92. _____________________________________________________________________________
  93.  
  94.   Function           : Set Vertical Parameters
  95.  
  96.  
  97.   QuickBASIC Syntax  : CALL tek2400.set.vertical (Channel%, VoltsDiv#, Cou%,_
  98.                                                     Inv%, Fif%)
  99.   C Syntax           : tek2400_set_vertical (Channel, VoltsDiv, Cou, Inv, Fif);
  100.                        int Channel;
  101.                        double VoltsDiv ;
  102.                        int Cou;
  103.                        int Inv;
  104.                        int Fif ;
  105.  
  106.   Purpose            : Configures the vertical volts/division, input coupling,
  107.                         invert setting, and input impedance of the scope.
  108.  
  109.   Parameter List     : Channel - channel of scope to configure
  110.                         1 or 2
  111.  
  112.                        VoltDiv - volts per division setting
  113.                         0.002 to 50.0, in 1-2-5 sequence
  114.  
  115.                        Cou - input coupling mode
  116.                          0 : AC
  117.                          1 : DC
  118.                          2 : GND
  119.  
  120.                        Inv - invert off or on
  121.                          0 : Off
  122.                          1 : On
  123.  
  124.                        Fif - fifty-ohm input impedance off or on
  125.                          0 : Off
  126.                          1 : On
  127.  
  128.   QuickBASIC Example : CALL tek2400.set.vertical(1, 10.0, 0, 0, 0)
  129.  
  130.   C Example          : tek2400_set_vertical(1, 10.0, 0, 0, 0);
  131.  
  132.   Error Codes        : The valid error codes for this function are:
  133.                            0 : Success
  134.                           -1 : Channel out of range
  135.                           -2 : Volts/Div out of range
  136.                           -3 : Coupling out of range
  137.                           -4 : Invert out of range
  138.                           -5 : Fifty-ohm Setting out of range
  139.                          230 : GPIB write error
  140.                          231 : GPIB read error
  141.                          232 : Instrument not initialized
  142.  
  143. _____________________________________________________________________________
  144.  
  145.   Function           : Set Vertical Mode
  146.  
  147.   QuickBASIC Syntax  : CALL tek2400.set.vertical.mode (VertMode%)
  148.  
  149.   C Example          : tek2400_set_vertical_mode (VertMode);
  150.                        int VertMode ;
  151.  
  152.   Purpose            : Configures the vertical display mode of the scope.
  153.  
  154.   Parameter List     : VertMode - the vertical display mode
  155.                         0 : Channel 1 only
  156.                         1 : Channel 2 only
  157.                         2 : Channel 1 and 2
  158.                         3 : Channel 1 Versus Channel 2 (XY)
  159.  
  160.   QuickBASIC Example : CALL tek2400.set.vertical.mode(1)
  161.  
  162.   C Example          : tek2400_set_vertical_mode(1);
  163.  
  164.   Error Codes        : The valid error codes for this function are:
  165.                            0 : Success
  166.                           -1 : Vertical Mode out of range
  167.                          230 : GPIB write error
  168.                          232 : Instrument not initialized
  169.  
  170. _____________________________________________________________________________
  171.  
  172.   Function           : Set Multiply Mode
  173.  
  174.   QuickBASIC Syntax  : CALL tek2400.set.multiply (Mult%)
  175.  
  176.   C Example          : tek2400_set_multiply (Mult);
  177.                        int Mult ;
  178.  
  179.   Purpose            : Turns multiply mode off or on.
  180.  
  181.   Parameter List     : Mult - multiply mode off or on
  182.                          0 : Off
  183.                          1 : On
  184.  
  185.   QuickBASIC Example : CALL tek2400.set.multiply(1)
  186.  
  187.   C Example          : tek2400_set_multiply(1);
  188.  
  189.   Error Codes        : The valid error codes for this function are:
  190.                            0 : Success
  191.                           -1 : Multiply out of range
  192.                          230 : GPIB write error
  193.                          232 : Instrument not initialized
  194.  
  195. _____________________________________________________________________________
  196.  
  197.   Function           : Set Add Mode
  198.  
  199.   QuickBASIC Syntax  : CALL tek2400.set.add (Add%)
  200.  
  201.   C Example          : tek2400_set_add (Add);
  202.                        int Add ;
  203.  
  204.   Purpose            : Turns add mode off or on.
  205.  
  206.   Parameter List     : Add - add mode off or on
  207.                          0 : Off
  208.                          1 : On
  209.  
  210.   QuickBASIC Example : CALL tek2400.set.add(1)
  211.  
  212.   C Example          : tek2400_set_add(1);
  213.  
  214.   Error Codes        : The valid error codes for this function are:
  215.                            0 : Success
  216.                           -1 : Add out of range
  217.                          230 : GPIB write error
  218.                          232 : Instrument not initialized
  219.  
  220. _____________________________________________________________________________
  221.  
  222.   Function           : Set Bandwidth
  223.  
  224.   QuickBASIC Syntax  : CALL tek2400.set.bw (BW)
  225.  
  226.   C Example          : tek2400_set_bw (BW);
  227.                        int BW ;
  228.  
  229.   Purpose            : Sets the bandwidth of the scope.
  230.  
  231.   Parameter List     : BW - the desired bandwidth setting
  232.                          0 : Full
  233.                          1 : 50 MHz for 2430A/2432
  234.                              100 MHz for 2440
  235.                          2 : 20 MHz
  236.  
  237.   QuickBASIC Example : CALL tek2400.set.bw(1)
  238.  
  239.   C Example          : tek2400_set_bw(1);
  240.  
  241.   Error Codes        : The valid error codes for this function are:
  242.                            0 : Success
  243.                           -1 : Bandwidth out of range
  244.                          230 : GPIB write error
  245.                          232 : Instrument not initialized
  246.  
  247. _____________________________________________________________________________
  248.  
  249.   Function           : Set Horizontal Parameters
  250.  
  251.   QuickBASIC Syntax  : CALL tek2400.set.horizontal (HorMode%, ASecDiv#, _
  252.                                                     BSecDiv#, Delay#, Pos%)
  253.  
  254.   C Syntax           : tek2400_set_horizontal (HorMode, ASecDiv, BSecDiv,
  255.                                                 Delay, Pos)
  256.                        int HorMode ;
  257.                        double ASecDiv ;
  258.                        double BSecDiv ;
  259.                        double Delay ;
  260.                        int Pos ;
  261.  
  262.   Purpose            : Configures the horizontal mode, sweep time for time-
  263.                         base A and B, the delay, and position
  264.  
  265.   Parameter List     : HorMode - the horizontal mode
  266.                          0 : A mode
  267.                          1 : A with B intensified
  268.                          2 : B mode
  269.  
  270.                        ASecDiv - seconds per division for timebase A
  271.                          2430A : 5 nS to 5 s
  272.                          2432, 2440 : 2 nS to 5 s
  273.  
  274.                        BSecDiv - seconds per division for timebase B
  275.                          All scopes : 5 nS to 5 s
  276.  
  277.                        Delay - delay time used by B timebase relative to A
  278.                          dependent upon scope and BSecDiv; refer to the
  279.                          user manual for your scope
  280.  
  281.                        Pos - horizontal position of traces on the display
  282.                          0 to 1023
  283.  
  284.   QuickBASIC Example : CALL tek2400.set.horzontal(1,10.0e-6, 100.e-6, 1.0e-3,_
  285.                                                     512)
  286.  
  287.   C Example          : tek2400_set_horizontal(1, 10.0e-6, 100.e-6, 1.0e-3,512);
  288.  
  289.   Error Codes        : The valid error codes for this function are:
  290.                            0 : Success
  291.                           -1 : Vertical Mode out of range
  292.                           -2 : A Sec/Div out of range
  293.                           -3 : B Sec/Div out of range
  294.                           -4 : Delay out of range
  295.                           -5 : Position out of range
  296.                          230 : GPIB write error
  297.                          231 : GPIB read error
  298.                          232 : Instrument not initialized
  299.  
  300. _____________________________________________________________________________
  301.  
  302.   Function           : Set A Trigger
  303.  
  304.   QuickBASIC Syntax  : CALL tek2400.set.a.trigger (Level#, Slope%, TPos%,_
  305.                                                     Mode%, Source%, Cou%)
  306.  
  307.   C Syntax           : tek2400_set_a_trigger (Level, Slope, TPos, Mode,
  308.                                                 Source, Cou);
  309.                        double Level ;
  310.                        int Slope ;
  311.                        int TPos ;
  312.                        int Mode ;
  313.                        int Source ;
  314.                        int Cou ;
  315.  
  316.   Purpose            : Configures the A trigger settings of the scope.
  317.  
  318.   Parameter List     : Level - trigger level in volts
  319.  
  320.                        Slope - determines whether trigger occurs on rising
  321.                         (positive) or falling (negative) transition of trigger
  322.                         signal
  323.                          0 : Negative
  324.                          1 : Positive
  325.  
  326.                        TPos - number of data points acquired prior to trigger
  327.                         with (1023 -[Tpos * 32]) points acquired after trigger
  328.                          1 to 30
  329.  
  330.                        Mode - trigger mode for trigger A
  331.                          0 : Auto level
  332.                          1 : Auto
  333.                          2 : Normal
  334.                          3 : Single
  335.  
  336.                        Source - source for A trigger signal
  337.                          0 : Vertical
  338.                          1 : Ch 1
  339.                          2 : Ch 2
  340.                          3 : External 1
  341.                          4 : External 2
  342.                          5 : Line
  343.                          6 : Word
  344.  
  345.                        Cou - input coupling for A trigger signal input
  346.                          0 : DC
  347.                          1 : AC
  348.                          2 : Noise reject
  349.                          3 : HF reject
  350.                          4 : LF reject
  351.  
  352.   QuickBASIC Example : CALL tek2400.set.a.trigger (2.0, 0, 31, 0, 1, 1)
  353.  
  354.   C Example          : tek2400_set_a_trigger (2.0, 0, 31, 0, 1, 1);
  355.  
  356.   Error Codes        : The valid error codes for this function are:
  357.                            0 : Success
  358.                           -1 : Level out of range
  359.                           -2 : Slope out of range
  360.                           -3 : Trigger Position out of range
  361.                           -4 : Mode out of range
  362.                           -5 : Source out of range
  363.                           -6 : Coupling out of range
  364.                          230 : GPIB write error
  365.                          231 : GPIB read error
  366.                          232 : Instrument not initialized
  367.  
  368. _____________________________________________________________________________
  369.  Control Name:  Ext1 / 5
  370.  
  371.  Variable Type: Integer
  372.  
  373.  Valid Values:  0   Do not divide by 5
  374.  
  375. _____________________________________________________________________________
  376.  
  377.   Function           : Set Gain of External input 1
  378.  
  379.   QuickBASIC Syntax  : CALL tek2400.set.ext1.div5 (Div5%)
  380.  
  381.   C Example          : tek2400_set_ext1_div5 (Div5);
  382.                        int Div5;
  383.  
  384.   Purpose            : Indicates whether or not to divide the signal from
  385.                         External input 1 by a factor of 5.
  386.  
  387.   Parameter List     : Div5
  388.                          0 : Do not divide by 5
  389.                          1 : Divide by 5
  390.  
  391.   QuickBASIC Example : CALL tek2400.set.ext1.div5(1)
  392.  
  393.   C Example          : tek2400_set_ext1_div5(1);
  394.  
  395.   Error Codes        : The valid error codes for this function are:
  396.                            0 : Success
  397.                           -1 : Div5 out of range
  398.                          230 : GPIB write error
  399.                          232 : Instrument not initialized
  400.  
  401. _____________________________________________________________________________
  402.  
  403.   Function           : Set Gain of External input 2
  404.  
  405.   Purpose            : Indicates whether or not to divide the signal from
  406.                         External input 2 by a factor of 5.
  407.  
  408.   QuickBASIC Syntax  : CALL tek2400.set.ext2.div5 (Div5%)
  409.  
  410.   C Example          : tek2400_set_ext2_div5 (Div5);
  411.                        int Div5;
  412.  
  413.   Parameter List     : Div5
  414.                          0 : Do not divide by 5
  415.                          1 : Divide by 5
  416.  
  417.   QuickBASIC Example : CALL tek2400.set.ext2.div5(1)
  418.  
  419.   C Example          : tek2400_set_ext2_div5(1);
  420.  
  421.   Error Codes        : The valid error codes for this function are:
  422.                            0 : Success
  423.                           -1 : Div5 out of range
  424.                          230 : GPIB write error
  425.                          232 : Instrument not initialized
  426.  
  427. _____________________________________________________________________________
  428.  
  429.   Function           : Set B Trigger
  430.  
  431.   QuickBASIC Syntax  : CALL tek2400.set.b.trigger (Level#, Slope%, TPos%, _
  432.                                                     Mode%, Source%, Cou%)
  433.  
  434.   C Syntax           : tek2400_set_a_trigger (Level, Slope, TPos, Mode,
  435.                                                 Source, Cou);
  436.                        double Level ;
  437.                        int Slope ;
  438.                        int TPos ;
  439.                        int Mode ;
  440.                        int Source ;
  441.                        int Cou ;
  442.  
  443.   Purpose            : Configures the B trigger settings of the scope.
  444.  
  445.   Parameter List     : Level - trigger level in volts
  446.  
  447.                        Slope - determines whether trigger occurs on rising
  448.                         (positive) or falling (negative) transition of trigger
  449.                         signal
  450.                          0 : Negative
  451.                          1 : Positive
  452.  
  453.                        TPos - number of data points acquired prior to trigger
  454.                         with (1023 -[Tpos * 32]) points acquired after trigger
  455.                          1 to 30
  456.  
  457.                        Mode - selects whether B sweep free-runs or must be
  458.                          triggered to run
  459.                          0 : Free run
  460.                          1 : Trigger required
  461.  
  462.                        Source - source for B trigger signal
  463.                          0 : Vertical
  464.                          1 : Ch 1
  465.                          2 : Ch 2
  466.                          3 : External 1
  467.                          4 : External 2
  468.                          5 : Word
  469.  
  470.                        Cou - input coupling for B trigger signal input
  471.                          0 : DC
  472.                          1 : AC
  473.                          2 : Noise reject
  474.                          3 : HF reject
  475.                          4 : LF reject
  476.  
  477.   QuickBASIC Example : CALL tek2400.set.b.trigger (2.0, 0, 31, 0, 1, 1)
  478.  
  479.   C Example          : tek2400_set_b_trigger (2.0, 0, 31, 0, 1, 1);
  480.  
  481.   Error Codes        : The valid error codes for this function are:
  482.                            0 : Success
  483.                           -1 : Level out of range
  484.                           -2 : Slope out of range
  485.                           -3 : Trigger Position out of range
  486.                           -4 : Mode out of range
  487.                           -5 : Source out of range
  488.                           -6 : Coupling out of range
  489.                          230 : GPIB write error
  490.                          231 : GPIB read error
  491.                          232 : Instrument not initialized
  492.  
  493. _____________________________________________________________________________
  494.  
  495.   Function           : Auto Setup
  496.  
  497.   QuickBASIC Syntax  : CALL tek2400.auto.setup (Mode%, Resolution%)
  498.  
  499.   C Syntax           : tek2400_auto_setup (Mode, Resolution)
  500.                        int Mode ;
  501.                        int Resolution ;
  502.  
  503.   Purpose            : Causes scope to automatically adjust vertical, hori-
  504.                          zontal, and trigger parameters to display the input
  505.                          waveform
  506.  
  507.   Parameter List     : Mode - specifies the characteristic of the input signal
  508.                          to use for optimizing the setup of the scope
  509.                          0 : View
  510.                          1 : Period
  511.                          2 : Rise
  512.                          3 : Fall
  513.                          4 : Pulse
  514.  
  515.                        Resolution - when set to HI, causes waveform to be
  516.                          spread over entire 20 division acquisition window;
  517.                          LO results in optimization of horizontal resolution
  518.                          to fit the waveform on the scope screen
  519.                          0 : HI
  520.                          1 : LO
  521.  
  522.   QuickBASIC Example :   CALL tek2400.auto.setup(0, 1)
  523.  
  524.   C Example          :   tek2400_auto_setup(0, 1);
  525.  
  526.   Error Codes        : The valid error codes for this function are:
  527.  
  528.                            0 : Success
  529.                           -1 : Mode out of range
  530.                           -2 : Resolution out of range
  531.                          230 : GPIB write error
  532.                          232 : Instrument not initialized
  533. _____________________________________________________________________________
  534.  
  535.   Function           : Set Acquisition Parameters
  536.  
  537.   QuickBASIC Syntax  : CALL tek2400.acq.set (AcqMode%, Delta%, Rep%, Env%, _
  538.                             Avg%, Ref1%, Ref2%,Ref3%, Ref4%, RunMode%)
  539.  
  540.   C Syntax           : tek2400_acq_set (AcqMode, Delta, Rep, Env, Avg, Ref1,
  541.                                         Ref2, Ref3, Ref4, RunMode);
  542.                        int AcqMode;
  543.                        int Delta;
  544.                        int Rep;
  545.                        int Env;
  546.                        int Avg;
  547.                        int Ref1;
  548.                        int Ref2;
  549.                        int Ref3;
  550.                        int Ref4;
  551.                        int RunMode;
  552.  
  553.   Parameter List     : AcqMode - sets the acquisition mode to normal, enve-
  554.                          lope, or average
  555.                          0 : Normal
  556.                          1 : Envelope
  557.                          2 : Average
  558.  
  559.                        Delta - turns Save-On-Delta mode off or on
  560.                          0 : Save-On-Delta off
  561.                          1 : Save-On-Delta on
  562.  
  563.                        Rep - turns repetitive sampling mode off or on
  564.                          0 : Repetitive mode off
  565.                          1 : Repetitive mode on
  566.  
  567.                        Env - sets the number of acquisitions over which
  568.                              which to accumalate envlopes (maximum and
  569.                              minimum values).
  570.                          0 : continuous
  571.                          1 to 256, powers of 2 : number of envelopes
  572.  
  573.                        Avg - number of sweeps to average before starting over
  574.                          2 to 256, powers of 2
  575.  
  576.                        Ref1 - specifies whether or not Reference 1 is
  577.                          displayed
  578.                          0 : Do not display
  579.                          1 : Display
  580.  
  581.                        Ref2 - specifies whether or not Reference 2 is
  582.                          displayed
  583.                          0 : Do not display
  584.                          1 : Display
  585.  
  586.                        Ref3 - specifies whether or not Reference 3 is
  587.                          displayed
  588.                          0 : Do not display
  589.                          1 : Display
  590.  
  591.                        Ref4 - specifies whether or not Reference 4 is
  592.                          displayed
  593.                          0 : Do not display
  594.                          1 : Display
  595.  
  596.                        RunMode - sets the action to occur when the function
  597.                          is executed
  598.                          0 : Leave current setting
  599.                          1 : Start an acquisition
  600.                          2 : Change to Save Mode
  601.  
  602.   QuickBASIC Example :   CALL tek2400.acq.set (0, 0, 1, 1, 2, 0, 0, 0, 0, 0)
  603.  
  604.   C Example          :   tek2400_acq_set (0, 0, 1, 1, 2, 0, 0, 0, 0, 0);
  605.  
  606.   Error Codes        : The valid error codes for this function are:
  607.                            0 : Success
  608.                           -1 : Acquisition Mode out of range
  609.                           -2 : Save-on-Delta out of range
  610.                           -3 : Repetitive Mode out of range
  611.                           -4 : Envelopes out of range
  612.                           -5 : Averages out of range
  613.                           -6 : Ref1 out of range
  614.                           -7 : Ref2 out of range
  615.                           -8 : Ref3 out of range
  616.                           -9 : Ref4 out of range
  617.                          -10 : Run Mode out of range
  618.                          230 : GPIB write error
  619.                          232 : Instrument not initialized
  620. _____________________________________________________________________________
  621.  
  622.   Function           : Save Settings
  623.  
  624.   QuickBASIC Syntax  : CALL tek2400.save.set(Filename$, Read/write%)
  625.  
  626.   C Syntax           : void tek2400_save_set(Filename, Read/Write);
  627.                        char *Filename;
  628.                        int Read/Write;
  629.  
  630.   Purpose            : Reads acquisition settings from a file and sends them
  631.                        to the scope or writes the current acquisition
  632.                        settings of the scope to a file depending on the
  633.                        Read/Write mode.
  634.  
  635.   Parameter List     : Filename - specifies the name of the file from which
  636.                                   to read or write.
  637.  
  638.  
  639.                        Read/Write - specifies whether to read settings from
  640.                                     file or to write current settings to file.
  641.  
  642.  
  643.   QuickBasic Example : CALL tek2400.save.set ("tek2400.set", 0)
  644.  
  645.   C Example          : tek2400_save_set ("tek2400.set", 0);
  646.  
  647.   Error Codes        : The valid error codes for this function are:
  648.                                 -1 : Read/Write out of range
  649.                                 -2 : Error reading or writing to file
  650.                               -230 : GPIB write error
  651.                               -231 : GPIB read error
  652.                               -232 : Instrument is not initialized
  653.                                400 : Error in opening or closing a file
  654.                                401 : Error in reading from or writing to
  655.                                      a file
  656. _____________________________________________________________________________
  657.  
  658.   Function           : Read Waveform
  659.  
  660.   QuickBASIC Syntax  : CALL tek2400.read.wfm(Source%,Wfm#(),SamplePer#, TrigPos#)
  661.  
  662.   C Syntax           : void tek2400_read_wfm(Source,Wfm,SamplePer,TrigPos);
  663.                        int Source;
  664.                        double Wfm[1024];
  665.                        double *SamplePer ;
  666.                        double *TrigPos ;
  667.  
  668.   Purpose            : Reads a waveform from an acquisition source or from a
  669.                         reference location.
  670.  
  671.   Parameter List     : Source - specifies the source of the waveform
  672.                          1 : Acquire from Channel 1
  673.                          2 : Acquire from Channel 2
  674.                          3 : Acquire waveform from Add operation
  675.                          4 : Acquire waveform from Multiply operation
  676.                          5 : Read Ref 1
  677.                          6 : Read Ref 2
  678.                          7 : Read Ref 3
  679.                          8 : Read Ref 4
  680.  
  681.  
  682.                        Wfm - a real array variable in which the wave-
  683.                              form data  is returned. This  array must
  684.                              be at least 1024 elements long.
  685.  
  686.                        SamplePer - a real variable in which the value
  687.                                    of the sampling period used by the
  688.                                    oscilloscope to digitize the wave-
  689.                                    form is returned.
  690.  
  691.                        TrigPos - a real variable indicating the position of
  692.                                  the trigger point in the waveform, i.e. the
  693.                                  sample number representing time 0.
  694.  
  695.   QuickBASIC Example : DIM wfm.data#(1024)
  696.                        CALL tek2400.read.wfm(1,wfm.data#(),period#, t.zero#)
  697.  
  698.   C Example          : double period;
  699.                        double t_zero ;
  700.                        double wfm_data[1024];
  701.                        tek2400_read_wfm(1,wfm_data,&period, &t_zero);
  702.  
  703.   Error Codes        : The valid error codes for this function are:
  704.                            0 : Success
  705.                           -1 : Source out of range
  706.                          230 : GPIB write error
  707.                          231 : GPIB read error
  708.                          232 : Instrument not initialized
  709.                          300 : Specified waveform source is not valid for
  710.                                current instrument configuration
  711. _____________________________________________________________________________
  712.  
  713.   Function           : Save to Reference
  714.  
  715.   QuickBASIC Syntax  : CALL tek2400.save.to.reference(Source%,Destination%)
  716.  
  717.   C Syntax           : void tek2400_save_to_reference(Source,Destination);
  718.                        int Source;
  719.                        int Destination ;
  720.  
  721.   Purpose            : Saves a waveform to a reference location.
  722.  
  723.   Parameter List     : Source - specifies the source of the waveform
  724.                          1 : Acquire from Channel 1
  725.                          2 : Acquire from Channel 2
  726.                          3 : Acquire waveform from Add channel
  727.                          4 : Acquire waveform from Multiply channel
  728.                          5 : Ref 1
  729.                          6 : Ref 2
  730.                          7 : Ref 3
  731.                          8 : Ref 4
  732.  
  733.                        Destination- specifies the location in which to save
  734.                             the waveform
  735.                          1 : Ref 1
  736.                          2 : Ref 2
  737.                          3 : Ref 3
  738.                          4 : Ref 4
  739.  
  740.   QuickBASIC Example : CALL tek2400.save.to.reference(1, 4)
  741.  
  742.   C Example          : tek2400_save_to_reference(1, 4);
  743.  
  744.   Error Codes        : The valid error codes for this function are:
  745.                            0 : Success
  746.                           -1 : Source out of range
  747.                           -2 : Destination out of range
  748.                          230 : GPIB write error
  749.                          231 : GPIB read error
  750.                          232 : Instrument not initialized
  751.                          300 : Specified waveform source is not valid for
  752.                                current instrument configuration
  753. _____________________________________________________________________________
  754.  
  755.   Function           : Setup Measurement
  756.  
  757.   QuickBASIC Syntax  : CALL tek2400.setup.measurement(Window%, Method%, Mark%)
  758.  
  759.   C Syntax           : tek2400_setup_measurement (Window, Method, Mark);
  760.                        int Window ;
  761.                        int Method ;
  762.                        int Mark ;
  763.  
  764.   Purpose            : Configures the parameters for taking measurements.
  765.  
  766.   Parameter List     : Window - turns measurement window off or on
  767.                          0 : window off
  768.                          1 : window on
  769.  
  770.                        Method - selects the method for determining Top and
  771.                         Bottom of the waveform for measurements
  772.                          0 : Min/Max
  773.                          1 : Histogram
  774.                          2 : Cursor (uses the current Volts cursor values)
  775.  
  776.                        Mark - turns the display threshold crossing marks on
  777.                         or off
  778.                          0 : marks off
  779.                          1 : marks on
  780.                          0 : Volts
  781.  
  782.   QuickBASIC Example : CALL tek2400.setup.measurement (0, 1, 0)
  783.  
  784.   C Example          : tek2400_setup_measurement (0, 1, 0);
  785.  
  786.   Error Codes        : The valid error codes for this function are:
  787.                            0 : Success
  788.                           -1 : Window out of range
  789.                           -2 : Method out of range
  790.                           -3 : Mark out of range
  791.                          230 : GPIB write error
  792.                          232 : Instrument not initialized
  793. _____________________________________________________________________________
  794.  
  795.   Function           : Read Measurement
  796.  
  797.   QuickBASIC Syntax  : CALL tek2400.read.measurement(Source%, Type%, Reading#)
  798.  
  799.   C Syntax           : tek2400_read_measurement (Source, Type, Reading);
  800.                        int Source ;
  801.                        int Type ;
  802.                        double *Reading ;
  803.  
  804.   Purpose            : Returns a single measurement.
  805.  
  806.   Parameter List     : Source - specifies the location of the waveform on
  807.                         which a measurement is made
  808.                          1 : Chan 1
  809.                          2 : Chan 2
  810.                          3 : Add channel
  811.                          4 : Multiply channel
  812.  
  813.                        Type - specifies the type of measurement to take
  814.                          0 : Distal
  815.                          1 : Mesial
  816.                          2 : Proximal
  817.                          3 : Max
  818.                          4 : Mid
  819.                          5 : Min
  820.                          6 : Peak-to-Peak
  821.                          7 : Top
  822.                          8 : Base
  823.                          9 : Mean
  824.                         10 : Overshoot
  825.                         11 : Undershoot
  826.                         12 : RMS
  827.                         13 : Area
  828.                         14 : Width
  829.                         15 : Duty
  830.                         16 : Frequency
  831.                         17 : Period
  832.                         18 : Rise time
  833.                         19 : Fall time
  834.                         20 : Delay
  835.  
  836.                        Reading - real variable to contain the measurement
  837.  
  838.   QuickBASIC Example : CALL tek2400.read.measurement (1, 0, reading#)
  839.  
  840.   C Example          : double reading ;
  841.                        tek2400_read_measurement (1, 0, &reading);
  842.  
  843.   Error Codes        : The valid error codes for this function are:
  844.                            0 : Success
  845.                           -1 : Source out of range
  846.                           -2 : Type out of range
  847.                          230 : GPIB write error
  848.                          231 : GPIB read error
  849.                          232 : Instrument not initialized
  850.                          300 : Specified waveform source is not valid for
  851.                                current instrument configuration
  852. _____________________________________________________________________________
  853.  
  854.   Function           : Set Cursor
  855.  
  856.   QuickBASIC Syntax  : CALL tek2400.set.cursor(OnOff%,Type%,Units%,Mode%)
  857.  
  858.   C Syntax           : void tek2400_set_cursor(OnOff,Type,Units,Mode);
  859.                        int OnOff;
  860.                        int Type;
  861.                        int Units;
  862.                        int Mode;
  863.  
  864.   Purpose            : Configures the cursor parameters to the specified
  865.                        values  and then  places the  instrument in local
  866.                        mode.
  867.  
  868.   Parameter List     : OnOff - cursors on/off mode
  869.                          0 : cursors off
  870.                          1 : cursors on
  871.  
  872.                        Type - measurement type
  873.                          0 : Volts
  874.                          1 : Time
  875.                          2 : 1/Time
  876.                          3 : Slope
  877.  
  878.                        Units - measurement units
  879.                          0 : Volts, Seconds, Hertz, or Volts/Second
  880.                          1 : Percent
  881.                          2 : dB or Degrees
  882.  
  883.                        Mode - measurement mode
  884.                          0 : Absolute
  885.                          1 : Delta
  886.  
  887.   QuickBASIC Example : CALL tek2400.set.cursor(1,0,0,0);
  888.  
  889.   C Example          : tek2400_set_cursor(1,0,0,0);
  890.  
  891.   Error Codes        : The valid error codes for this function are:
  892.                            0 : Success
  893.                           -1 : On/Off out of range
  894.                           -2 : Type out of range
  895.                           -3 : Units out of range
  896.                           -4 : Mode out of range
  897.                          230 : GPIB write error
  898.                          232 : Instrument not initialized
  899.                          234 : Unable to place instrument in local mode
  900. _____________________________________________________________________________
  901.  
  902.   Function           : Read Cursor
  903.  
  904.   QuickBASIC Syntax  : CALL tek2400.read.cursor(Value#)
  905.  
  906.   C Syntax           : void tek2400_read_cursor(Value);
  907.                        double *Value;
  908.  
  909.   Purpose            : Returns the current cursor measurement.
  910.  
  911.   Parameter List     : Value - a real variable in which the value of
  912.                                the cursor measurement is returned.
  913.  
  914.   QuickBASIC Example : CALL tek2400.read.cursor(slope#);
  915.  
  916.   C Example          : double slope;
  917.  
  918.                        tek2400_read_cursor(&slope);
  919.  
  920.   Error Codes        : The valid error codes for this function are:
  921.                            0 : Success
  922.                           -1 : Cursors are turned off
  923.                          230 : GPIB write error
  924.                          231 : GPIB read error
  925.                          232 : Instrument not initialized
  926.                          234 : Unable to place instrument in local mode
  927. _____________________________________________________________________________
  928.  
  929.   Function           : Close
  930.  
  931.   QuickBASIC Syntax  : CALL tek2400.close()
  932.  
  933.   C Syntax           : void tek2400_close();
  934.  
  935.   Purpose            : Effectively disconnects the 2340A from the GPIB
  936.                        and returns the instrument to local mode.
  937.  
  938.   Parameter List     : NONE
  939.  
  940.   QuickBASIC Example : CALL tek2400.close()
  941.  
  942.   C Example          : tek2400_close();
  943.  
  944.   Error Codes        : The valid error codes for this function are:
  945.                            0 : Success
  946.                          221 : Unable to close instrument
  947.                          232 : Instrument not initialized
  948. _____________________________________________________________________________
  949.